<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<div class="block">
    
    <div class="block_head">
        <div class="bheadl"></div>
        <div class="bheadr"></div>
        
        <h2>Edit Profile</h2>
        
    </div>
    <!-- .block_head ends -->
    
    <div class="block_content clearfix">
        <html:form styleClass="validate-form" action="admin/profile.do" method="post">
            
            <logic:notEmpty name="errorMessages" >
                <div class="message errormsg">
                    <logic:iterate id="message" name="errorMessages">
                        <p><bean:write name="message"/></p>
                    </logic:iterate>
                </div>
            </logic:notEmpty>
            <logic:notEmpty name="successMessages" >
                <div class="message success">
                    <logic:iterate id="message" name="successMessages">
                        <p><bean:write name="message"/></p>
                    </logic:iterate>
                </div>
            </logic:notEmpty>
            
            <p>
                <label>Joined On: </label>
                <span class="text"><fmt:formatDate type="both" value="${user.createdDate}"/></span>
            </p>
            <p>
                <label>Group: </label>
                <span class="text"><bean:write name="user" property="groupName"/></span>
            </p>
            <p>
                <label>Username: </label>
                <span class="text"><bean:write name="user" property="userName"/></span>
            </p>
            <p>
                <label>Email:</label><span class="required">*</span><br/>
                <html:text styleClass="text medium required email" property="email" title="Please enter a valid email address."/>
            </p>
            
            <p>
                <label>Password:</label><span class="required">*</span><br/>
                <input class="text required" type="password" name="password" maxlength="50" title="Please enter your password."/>
            </p>
            
            <p>
                <label>New Password:</label><span class="required">*</span><br/>
                <input class="text" name="newPassword" type="password" minlength="6" maxlength="50"/>
            </p>
            
            <p>
                <label>Confirm New Password:</label><span class="required">*</span><br/>
                <input class="text" equalTo="[name=newPassword]" type="password" maxlength="50" title="Please enter the same New Password above."/>
            </p>
            
            <p>
                <label for="fullName">Display Name:</label><span class="required">*</span><br/>
                <html:text styleClass="text required" property="fullName"/>
            </p>
            
            <p>
                <label for="gender">Gender:</label><br/>
                <html:select property="gender" styleClass="chzn-select">
                    <option value="">Not Telling</option>
                    <html:option value="1">Male</html:option>
                    <html:option value="0">Female</html:option>
                </html:select>
            </p>
            
            <hr/>
            
            <p>
                <html:submit property="action" value="Save" styleClass="submit small"/>
            </p>
            
            
        </div>
        <!-- .block_content ends -->
    </html:form>
        
    <div class="bendl"></div>
    <div class="bendr"></div>
    
</div>
<!-- .block ends -->
